﻿/*
Copyright (c) Microsoft Corporation
All rights reserved. 
Licensed under the Apache License, Version 2.0 (the ""License""); you may not use this file except in compliance with 
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, 
INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
MERCHANTABLITY OR NON-INFRINGEMENT. 

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.
*/

/* Styles for the query builder container: query builder + results. */
#queryBuilderContainer {
    position: relative;
    font-family: "Segoe UI", Helvetica, Verdana;
    width: auto;
}

#queryBuilderContainer * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#queryBuilderContainer #queryBusy {
    background: #606060 url(images/msls-loader-light.gif) no-repeat center center;
    cursor: wait;
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5000;
    -moz-opacity: .35;
    opacity: .35;
}

#queryBuilderContainer h1 {
    font-weight: normal;
    font-size: 2em;
    line-height: 1em;
    padding-bottom: 10px;
}

#queryBuilderContainer button {
    border: 0;
}

#queryBuilderContainer .buttonQuery {
    cursor: pointer;
    margin-top: 15px;
    padding: 10px;
    width: 80px;
    height: 35px;
}

#queryBuilderContainer #submitQuery {
    background: #29ABE0;
    color: #FFFFFF;
    margin-right: 15px;
}

#queryBuilderContainer #clearQuery {
    color: #000000;
    background-color: #E6E6E6;
}

#queryBuilderContainer .wrongInput {
    background-color: #f8a4a4;
}

#queryBuilderContainer .error {
    color: #ff0000;
}

#queryBuilderContainer .navigationDropdown {
    background-color: #d0ebfa;
}

/* Styles for the query builder. */
#queryBuilder {
    margin-bottom: 20px;
}

#queryBuilder .addCondition, #queryBuilder .removeCondition {
    cursor: pointer;
    width: 20px;
    color: transparent;
    height: 20px;
    margin: 7px 3px 3px 9px;
    padding: 0;
}

#queryBuilder .addCondition {
    background: url() no-repeat;
}

#queryBuilder .removeCondition {
    background: url() no-repeat;
}

#queryBuilder #queryUrl {
    font-size: 80%;
}

#queryBuilderForm select {
    padding: 2px;
    margin: 5px;
}

#queryBuilderForm input {
    padding: 3px;
    margin: 5px;
    width: inherit;
}

#queryBuilderForm input[type=text] {
    min-width: 250px;
}

#queryBuilder label {
    display: inline-block;
    padding-top: 4px;
    min-width: 100px;
    /* Without this one FF and Chrome wil put the label on top of the buttons and they will make them not clickable. */
    z-index: -1;
}

#queryBuilderForm #orderByFiltersList,
#queryBuilderForm #selectFiltersList,
#queryBuilderForm #expandFiltersList {
    display: none;
}

#queryBuilderForm #orderByConditions.listVisible span,
#queryBuilderForm #selectConditions.listVisible span,
#queryBuilderForm #expandConditions.listVisible span {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 200px;
    width: auto;
    display: inline-block;
    padding-bottom: 10px;
    padding-right: 10px;
}

#queryBuilderForm .listVisible button {
    vertical-align: top;
    background: url() no-repeat;
}

#queryBuilderForm .filterList > label {
    display: block;
    margin-right: 20px;
    white-space: nowrap;
}

#queryBuilderForm .filterContainer {
    padding-left: 68px;
    position: relative;
}

#queryBuilderForm .filterLabel {
    display: inline-block;
    float: left;
    position: absolute;
    left: 0;
    vertical-align: top;
}

/* Styles for the results. */
#results {
    margin-top: 10px;
}

#results table.defaultResultsFormatting {
    border-collapse: collapse;
}

#results table.defaultResultsFormatting tbody tr:not(.expandedChild):hover {
    background-color: #DAECEF;
}

#results table.defaultResultsFormatting th {
    background: #E6E6E6;
    color: #000000;
}

#results table.defaultResultsFormatting th, #results table.defaultResultsFormatting td {
    border: 0;
    padding: 2px 3px;
    text-align: left;
}

#results td table.defaultResultsFormatting th, #results td table.defaultResultsFormatting td {
    padding: 1px 2px;
}

#results table.defaultResultsFormatting tr:not(.expandedChild) > td {
    max-width: 300px;
    max-height: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#results table.defaultResultsFormatting .expandedChild > td {
    padding: 0 0 0 50px;
    position: relative;
    min-height: 30px;
}

#results table.defaultResultsFormatting .expandedChild > td table {
    margin-bottom: 8px;
}

#results .expandChild {
    background: url() no-repeat;
    display: inline-block;
    width: 12px;
    height: 14px;
}

#results .expandChild.collapsed {
    background: url() no-repeat;
}